<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<c:url value="/resources/css/view.css"/>" >
</head>
<body> 
 
<h1>Order statuses for order <c:out value="${orderId}" /></h1>
<table style="text-align: right;">
<tr>
  <th width="100">Status</th>
  <th width="100">Place</th>
  <th width="200">Time</th>
  </tr>
 <c:forEach var="orderStatus" items="${orderStatuses}" varStatus="status">
  <tr>
	
   <td><c:out value="${orderStatus.orderStatusName.name}" /></td>

   <td><c:out value="${orderStatus.place}" /></td>
   
   <fmt:formatDate value="${orderStatus.statusTime}" var="dateString" pattern="dd-MM-yyyy HH:mm" />
   <td><c:out value="${dateString}" /></td>
   
  </tr>
 </c:forEach>
</table>
<table style="text-align: right;">
<tr>
<%-- <c:url var="backUrl" value="/admin/order" > --%>
<%--  		<c:param name="userId" value="${userId}" /> --%>
<%-- </c:url> --%>
<%-- <td> <a href='<c:out value="${backUrl}"/>'>back</a> </td> --%>
</tr>
 <tr>
 	<c:url var="backUrl" value="/order" >
    </c:url>
	<td><a href="${backUrl}" > back </a></td>
</tr>
</table>

</body>
</html>